import React from 'react'
import propTypes from 'prop-types'
function Son2({ count, msg, name, changeCount }) {
    return (
        <div>
            <h1>Son2组件</h1>
            <div>count:{count}</div>
            <div>msg:{msg}</div>
            <div>name:{name}</div>
            <button onClick={() => changeCount(100)}>修改count</button>
        </div>
    )
}
Son2.propTypes = {
    name: propTypes.string.isRequired,
    count: propTypes.number
}
Son2.defaultProps = {
    name: '我是你爹'
}
export default Son2
